import { cenoOptionKeys, requestOptionsRegistry } from "../core/constants"

export const findUnknownOptions = (
    request: Request,
    options: Record<string, unknown>
) => {
    const unknownOptions: Record<string, unknown> = {}

    for (const key in options) {
        if (!(key in requestOptionsRegistry) && 
            !(key in cenoOptionKeys) && 
            !(key in request)) {
            unknownOptions[key] = options[key]
        }
    }

    return unknownOptions
}